\(\int \frac {\csc ^5(x)}{a+a \csc (x)} \, dx\) [1]

   Optimal result
   Rubi [A] (verified)
   Mathematica [B] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 55 \[ \int \frac {\csc ^5(x)}{a+a \csc (x)} \, dx=\frac {3 \text {arctanh}(\cos (x))}{2 a}-\frac {4 \cot (x)}{a}-\frac {4 \cot ^3(x)}{3 a}+\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc ^3(x)}{a+a \csc (x)} \]

[Out]

3/2*arctanh(cos(x))/a-4*cot(x)/a-4/3*cot(x)^3/a+3/2*cot(x)*csc(x)/a+cot(x)*csc(x)^3/(a+a*csc(x))

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {3903, 3872, 3853, 3855, 3852} \[ \int \frac {\csc ^5(x)}{a+a \csc (x)} \, dx=\frac {3 \text {arctanh}(\cos (x))}{2 a}-\frac {4 \cot ^3(x)}{3 a}-\frac {4 \cot (x)}{a}+\frac {\cot (x) \csc ^3(x)}{a \csc (x)+a}+\frac {3 \cot (x) \csc (x)}{2 a} \]

[In]

Int[Csc[x]^5/(a + a*Csc[x]),x]

[Out]

(3*ArcTanh[Cos[x]])/(2*a) - (4*Cot[x])/a - (4*Cot[x]^3)/(3*a) + (3*Cot[x]*Csc[x])/(2*a) + (Cot[x]*Csc[x]^3)/(a
 + a*Csc[x])

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rule 3903

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[d^2*Cot[e +
 f*x]*((d*Csc[e + f*x])^(n - 2)/(f*(a + b*Csc[e + f*x]))), x] - Dist[d^2/(a*b), Int[(d*Csc[e + f*x])^(n - 2)*(
b*(n - 2) - a*(n - 1)*Csc[e + f*x]), x], x] /; FreeQ[{a, b, d, e, f}, x] && EqQ[a^2 - b^2, 0] && GtQ[n, 1]

Rubi steps \begin{align*} \text {integral}& = \frac {\cot (x) \csc ^3(x)}{a+a \csc (x)}-\frac {\int \csc ^3(x) (3 a-4 a \csc (x)) \, dx}{a^2} \\ & = \frac {\cot (x) \csc ^3(x)}{a+a \csc (x)}-\frac {3 \int \csc ^3(x) \, dx}{a}+\frac {4 \int \csc ^4(x) \, dx}{a} \\ & = \frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc ^3(x)}{a+a \csc (x)}-\frac {3 \int \csc (x) \, dx}{2 a}-\frac {4 \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (x)\right )}{a} \\ & = \frac {3 \text {arctanh}(\cos (x))}{2 a}-\frac {4 \cot (x)}{a}-\frac {4 \cot ^3(x)}{3 a}+\frac {3 \cot (x) \csc (x)}{2 a}+\frac {\cot (x) \csc ^3(x)}{a+a \csc (x)} \\ \end{align*}

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(113\) vs. \(2(55)=110\).

Time = 1.10 (sec) , antiderivative size = 113, normalized size of antiderivative = 2.05 \[ \int \frac {\csc ^5(x)}{a+a \csc (x)} \, dx=\frac {-20 \cot \left (\frac {x}{2}\right )+3 \csc ^2\left (\frac {x}{2}\right )+36 \log \left (\cos \left (\frac {x}{2}\right )\right )-36 \log \left (\sin \left (\frac {x}{2}\right )\right )-3 \sec ^2\left (\frac {x}{2}\right )+8 \csc ^3(x) \sin ^4\left (\frac {x}{2}\right )+\frac {48 \sin \left (\frac {x}{2}\right )}{\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )}-\frac {1}{2} \csc ^4\left (\frac {x}{2}\right ) \sin (x)+20 \tan \left (\frac {x}{2}\right )}{24 a} \]

[In]

Integrate[Csc[x]^5/(a + a*Csc[x]),x]

[Out]

(-20*Cot[x/2] + 3*Csc[x/2]^2 + 36*Log[Cos[x/2]] - 36*Log[Sin[x/2]] - 3*Sec[x/2]^2 + 8*Csc[x]^3*Sin[x/2]^4 + (4
8*Sin[x/2])/(Cos[x/2] + Sin[x/2]) - (Csc[x/2]^4*Sin[x])/2 + 20*Tan[x/2])/(24*a)

Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.24

method result size
default \(\frac {\frac {\tan \left (\frac {x}{2}\right )^{3}}{3}-\tan \left (\frac {x}{2}\right )^{2}+7 \tan \left (\frac {x}{2}\right )-\frac {1}{3 \tan \left (\frac {x}{2}\right )^{3}}+\frac {1}{\tan \left (\frac {x}{2}\right )^{2}}-\frac {7}{\tan \left (\frac {x}{2}\right )}-12 \ln \left (\tan \left (\frac {x}{2}\right )\right )-\frac {16}{\tan \left (\frac {x}{2}\right )+1}}{8 a}\) \(68\)
parallelrisch \(-\frac {3 \left (\left (\frac {\sin \left (4 x \right )}{2}-\sin \left (2 x \right )\right ) \ln \left (\csc \left (x \right )-\cot \left (x \right )\right )+\sin \left (3 x \right )+\frac {5 \sin \left (4 x \right )}{8}-\frac {5 \sin \left (x \right )}{3}-\frac {16 \cos \left (2 x \right )}{9}+\frac {8 \cos \left (4 x \right )}{9}-\frac {5 \sin \left (2 x \right )}{4}\right ) \tan \left (x \right )}{a \left (-3-\cos \left (4 x \right )+4 \cos \left (2 x \right )\right )}\) \(79\)
risch \(-\frac {9 i {\mathrm e}^{5 i x}+9 \,{\mathrm e}^{6 i x}-24 i {\mathrm e}^{3 i x}-24 \,{\mathrm e}^{4 i x}+7 i {\mathrm e}^{i x}+39 \,{\mathrm e}^{2 i x}-16}{3 \left ({\mathrm e}^{2 i x}-1\right )^{3} \left (i+{\mathrm e}^{i x}\right ) a}-\frac {3 \ln \left ({\mathrm e}^{i x}-1\right )}{2 a}+\frac {3 \ln \left ({\mathrm e}^{i x}+1\right )}{2 a}\) \(99\)
norman \(\frac {-\frac {\tan \left (\frac {x}{2}\right )}{24 a}+\frac {\tan \left (\frac {x}{2}\right )^{2}}{12 a}-\frac {3 \tan \left (\frac {x}{2}\right )^{3}}{4 a}+\frac {3 \tan \left (\frac {x}{2}\right )^{6}}{4 a}-\frac {\tan \left (\frac {x}{2}\right )^{7}}{12 a}+\frac {\tan \left (\frac {x}{2}\right )^{8}}{24 a}-\frac {15 \tan \left (\frac {x}{2}\right )^{4}}{4 a}}{\tan \left (\frac {x}{2}\right )^{4} \left (\tan \left (\frac {x}{2}\right )+1\right )}-\frac {3 \ln \left (\tan \left (\frac {x}{2}\right )\right )}{2 a}\) \(103\)

[In]

int(csc(x)^5/(a+a*csc(x)),x,method=_RETURNVERBOSE)

[Out]

1/8/a*(1/3*tan(1/2*x)^3-tan(1/2*x)^2+7*tan(1/2*x)-1/3/tan(1/2*x)^3+1/tan(1/2*x)^2-7/tan(1/2*x)-12*ln(tan(1/2*x
))-16/(tan(1/2*x)+1))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 168 vs. \(2 (49) = 98\).

Time = 0.25 (sec) , antiderivative size = 168, normalized size of antiderivative = 3.05 \[ \int \frac {\csc ^5(x)}{a+a \csc (x)} \, dx=\frac {32 \, \cos \left (x\right )^{4} + 14 \, \cos \left (x\right )^{3} - 48 \, \cos \left (x\right )^{2} + 9 \, {\left (\cos \left (x\right )^{4} - 2 \, \cos \left (x\right )^{2} - {\left (\cos \left (x\right )^{3} + \cos \left (x\right )^{2} - \cos \left (x\right ) - 1\right )} \sin \left (x\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - 9 \, {\left (\cos \left (x\right )^{4} - 2 \, \cos \left (x\right )^{2} - {\left (\cos \left (x\right )^{3} + \cos \left (x\right )^{2} - \cos \left (x\right ) - 1\right )} \sin \left (x\right ) + 1\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + 2 \, {\left (16 \, \cos \left (x\right )^{3} + 9 \, \cos \left (x\right )^{2} - 15 \, \cos \left (x\right ) - 6\right )} \sin \left (x\right ) - 18 \, \cos \left (x\right ) + 12}{12 \, {\left (a \cos \left (x\right )^{4} - 2 \, a \cos \left (x\right )^{2} - {\left (a \cos \left (x\right )^{3} + a \cos \left (x\right )^{2} - a \cos \left (x\right ) - a\right )} \sin \left (x\right ) + a\right )}} \]

[In]

integrate(csc(x)^5/(a+a*csc(x)),x, algorithm="fricas")

[Out]

1/12*(32*cos(x)^4 + 14*cos(x)^3 - 48*cos(x)^2 + 9*(cos(x)^4 - 2*cos(x)^2 - (cos(x)^3 + cos(x)^2 - cos(x) - 1)*
sin(x) + 1)*log(1/2*cos(x) + 1/2) - 9*(cos(x)^4 - 2*cos(x)^2 - (cos(x)^3 + cos(x)^2 - cos(x) - 1)*sin(x) + 1)*
log(-1/2*cos(x) + 1/2) + 2*(16*cos(x)^3 + 9*cos(x)^2 - 15*cos(x) - 6)*sin(x) - 18*cos(x) + 12)/(a*cos(x)^4 - 2
*a*cos(x)^2 - (a*cos(x)^3 + a*cos(x)^2 - a*cos(x) - a)*sin(x) + a)

Sympy [F]

\[ \int \frac {\csc ^5(x)}{a+a \csc (x)} \, dx=\frac {\int \frac {\csc ^{5}{\left (x \right )}}{\csc {\left (x \right )} + 1}\, dx}{a} \]

[In]

integrate(csc(x)**5/(a+a*csc(x)),x)

[Out]

Integral(csc(x)**5/(csc(x) + 1), x)/a

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 120 vs. \(2 (49) = 98\).

Time = 0.23 (sec) , antiderivative size = 120, normalized size of antiderivative = 2.18 \[ \int \frac {\csc ^5(x)}{a+a \csc (x)} \, dx=\frac {\frac {21 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {3 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + \frac {\sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}}}{24 \, a} + \frac {\frac {2 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} - \frac {18 \, \sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - \frac {69 \, \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} - 1}{24 \, {\left (\frac {a \sin \left (x\right )^{3}}{{\left (\cos \left (x\right ) + 1\right )}^{3}} + \frac {a \sin \left (x\right )^{4}}{{\left (\cos \left (x\right ) + 1\right )}^{4}}\right )}} - \frac {3 \, \log \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right )}{2 \, a} \]

[In]

integrate(csc(x)^5/(a+a*csc(x)),x, algorithm="maxima")

[Out]

1/24*(21*sin(x)/(cos(x) + 1) - 3*sin(x)^2/(cos(x) + 1)^2 + sin(x)^3/(cos(x) + 1)^3)/a + 1/24*(2*sin(x)/(cos(x)
 + 1) - 18*sin(x)^2/(cos(x) + 1)^2 - 69*sin(x)^3/(cos(x) + 1)^3 - 1)/(a*sin(x)^3/(cos(x) + 1)^3 + a*sin(x)^4/(
cos(x) + 1)^4) - 3/2*log(sin(x)/(cos(x) + 1))/a

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 96, normalized size of antiderivative = 1.75 \[ \int \frac {\csc ^5(x)}{a+a \csc (x)} \, dx=-\frac {3 \, \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right )}{2 \, a} + \frac {a^{2} \tan \left (\frac {1}{2} \, x\right )^{3} - 3 \, a^{2} \tan \left (\frac {1}{2} \, x\right )^{2} + 21 \, a^{2} \tan \left (\frac {1}{2} \, x\right )}{24 \, a^{3}} - \frac {2}{a {\left (\tan \left (\frac {1}{2} \, x\right ) + 1\right )}} + \frac {66 \, \tan \left (\frac {1}{2} \, x\right )^{3} - 21 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 3 \, \tan \left (\frac {1}{2} \, x\right ) - 1}{24 \, a \tan \left (\frac {1}{2} \, x\right )^{3}} \]

[In]

integrate(csc(x)^5/(a+a*csc(x)),x, algorithm="giac")

[Out]

-3/2*log(abs(tan(1/2*x)))/a + 1/24*(a^2*tan(1/2*x)^3 - 3*a^2*tan(1/2*x)^2 + 21*a^2*tan(1/2*x))/a^3 - 2/(a*(tan
(1/2*x) + 1)) + 1/24*(66*tan(1/2*x)^3 - 21*tan(1/2*x)^2 + 3*tan(1/2*x) - 1)/(a*tan(1/2*x)^3)

Mupad [B] (verification not implemented)

Time = 17.69 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.62 \[ \int \frac {\csc ^5(x)}{a+a \csc (x)} \, dx=\frac {7\,\mathrm {tan}\left (\frac {x}{2}\right )}{8\,a}-\frac {23\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3+6\,{\mathrm {tan}\left (\frac {x}{2}\right )}^2-\frac {2\,\mathrm {tan}\left (\frac {x}{2}\right )}{3}+\frac {1}{3}}{8\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^4+8\,a\,{\mathrm {tan}\left (\frac {x}{2}\right )}^3}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{8\,a}+\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^3}{24\,a}-\frac {3\,\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{2\,a} \]

[In]

int(1/(sin(x)^5*(a + a/sin(x))),x)

[Out]

(7*tan(x/2))/(8*a) - (6*tan(x/2)^2 - (2*tan(x/2))/3 + 23*tan(x/2)^3 + 1/3)/(8*a*tan(x/2)^3 + 8*a*tan(x/2)^4) -
 tan(x/2)^2/(8*a) + tan(x/2)^3/(24*a) - (3*log(tan(x/2)))/(2*a)